#实现根据字典的值查询并返回对应的键
def get_key(My_dict, value):
    result_dict = {}
    for v in value:
        result_dict[v] = [key for key, val in My_dict.items() if val == v]
    return result_dict

My_dict={"西安":"029","宝鸡":"0917","渭南":"0913","咸阳":"029","铜川":"0919","汉中":"0916","安康":"0915","商洛":"0914","延安":"0911","榆林":"0912"}
query_values = ["029","0913","0918"]
print(get_key(My_dict, query_values))